<?php
/**
 * Core_Data_Login
 * login template initialization
 * 
 * @author Adrian Stolarski
 */
class Login_Data_Login implements Login_Data_Mainable {
    
    /**
     *
     * @var type $token
     * only use token
     */
    public $token;
    
    public function __construct() {
        $this->token = new Core_Data_Tokenizer;
    }
    
    /**
     * main()
     * login action initialize
     * 
     * @param array $variables
     * @return array $page
     */
    public function main(array $variables = null) {
        $page = array();
        $template = SERVER_ROOT."login/views/login.php";
        $page['template'] = $template;
        $page['csrf_token'] = $this->token->create_token();
        return $page;
    }

}
